<%-- 
  - Author: Asna
  - Date: 08-Feb-2012
  - Copyright Notice: TRAKHEES
  - Description: Detail page of notification
 --%>
 <%@ include file="/WEB-INF/view/include.jsp"%>
<c:if test="${NotificationDetail.unreaded}">
	<script>
		$(document).ready(function(){
			setTimeout("markNotificationAsReaded(${NotificationDetail.notificationId})",5000);
		});
		function markNotificationAsReaded(id){
			$.post("markNotificationAsReaded/"+id);
		}
	</script>
</c:if>


    <div class="t_tmiddle-right">
    	<div id="tabs">
	      <ul id="TabHeader">
	      	<li><a href="#NotificationDetails"><spring:message code="label.notification" /></a></li>
	      </ul>
	      <form class="t_form">
	      <div id="NotificationDetails">
	      		<fieldset>
            		<legend><spring:message code="label.notification" /></legend>
            	</fieldset>
	      		<div class="t_form-left">
	      			<label for="notifyNo"><spring:message code="label.notify_no" /></label>
               	    <input id="notifyNo" value="${NotificationDetail.notificationId}" class="t_form-fld-disable" disabled />
                	
                	<label for="serviceName"><spring:message code="label.notify_servicename" /></label>
                	<spring:message  var="notificationServiceName" code="CLDOS_SERVICE_MASTER_${NotificationDetail.serviceCode}" />
               	    <input id="serviceName" value="${notificationServiceName}" class="t_form-fld-disable" disabled />
               	    
               	    <label for="referenceNo"><spring:message code="label.notify_refno" /></label>
               	    <input id="referenceNo" value="${NotificationDetail.clientRefNo}" class="t_form-fld-disable" disabled />
               	    
               	    <label for="notifySubject"><spring:message code="label.notify_sub" /></label>
               	    <c:choose>
						<c:when	test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
							<input id="notifySubject" value="${NotificationDetail.subjectAr}" class="t_form-fld-disable" disabled />
						</c:when>
						<c:otherwise>
							<input id="notifySubject" value="${NotificationDetail.subject}" class="t_form-fld-disable" disabled />
						</c:otherwise>
					</c:choose>
               	    
               	    
               	    <label for="notifyDetail"><spring:message code="label.notify_dtl" /></label>
               	    <c:choose>
						<c:when	test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
							<textarea id="notifyDetail" type="text" class="t_form-fld-disable" disabled style="width:600px; height: 200px; margin: 0 0 30px 0;">${NotificationDetail.detailsAr}</textarea><br/>
						</c:when>
						<c:otherwise>
							<textarea id="notifyDetail" type="text" class="t_form-fld-disable" disabled style="width:600px; height: 200px; margin: 0 0 30px 0;">${NotificationDetail.details}</textarea><br/>
						</c:otherwise>
					</c:choose>
               	    
               	    
               	    <span style="float:left;"><spring:message code="label.notify_atchment" /></span><br/>
               	    <ul style="float:left;">
               	    	<c:forEach items="${NotificationDetail.fileVOs}" var="item">
               	    		<li>
               	    			<a id="clear_a" href="gsfile/${item.encryptedFileId}">${item.fileName}${item.fileExt}</a>
               	    		</li>
               	    	</c:forEach>
               	    </ul>
               	    
               	    
	      		</div>
	      		<div id="fm-submit"><button type="button" id="OKButton" class="button_small" onclick="window.location='${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/admin/general/inbox/notifications/show.htm';"><spring:message code="button.ok" /></button></div>
	      </div>
	     </form>
	   </div>
	      
   </div>

   <script>
   
   	$().ready(function() {
   			$('#tabs').tabs();
   			$('#TabHeader').removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
			$('#TabHeader > li').removeClass('ui-state-default ui-corner-top ui-state-active ui-state-hover');
			$('#tabs').removeClass('ui-widget ui-widget-content ui-corner-all');
   	});
   </script>